import socket


sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sk.bind(('',50002))
sk.listen(5)
conn,address = sk.accept()

while True:
    print('已连接的客户端:',address)
    data = conn.recv(1024)
    print(data.decode('utf8'))
    if not data:
        conn.sendall(bytes('传递过来的参数为：None','utf8'))
    else:
        conn.sendall(data)


